Call JavaScript in SharePoint Page.



If you ever want to load your script code at the correct moment in a share-point page.

Run javascript at the end of page load , right at the correct moment.
<script>


document.addEventListener("DOMContentLoaded", theDomHasLoaded, false);
window.addEventListener("load", pageFullyLoaded, false);
function theDomHasLoaded(e) {
    // do something
}
function pageFullyLoaded(e) {
    // do something again
}
</script>
Refer to this link
Call JavaScript in SharePoint Page. Call JavaScript in SharePoint Page. Reviewed by Srikant N on Tuesday, April 26, 2016 Rating: 5

No comments :

Thanks for your time ! Have a great day.

Copyright 2016 (Srikant N). Powered by Blogger.